/**
* 
* Copyright [2007] [Sunny Liu]
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*   Unless required by applicable law or agreed to in writing, software
*   distributed under the License is distributed on an "AS IS" BASIS,
*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*   See the License for the specific language governing permissions and
*   limitations under the License.
*/
package ${appConfig.outputPackageName}.service;


import java.util.List;

<#list entities as entity>
import ${appConfig.outputPackageName}.model.${entity.javaName};
</#list>


public interface ${appConfig.appJavaName}Service
{

	<#list entities as entity>
	
	//=============================================================================
	//    DAO method defined for domain object 
	//    ${appConfig.outputPackageName}.model.${entity.javaName};
	//=============================================================================
	
	public <#if appConfig.webServiceApp >${entity.javaName}[]<#else>List</#if> findAll${entity.javaName}();	
	public ${entity.javaName} add${entity.javaName}(${entity.javaName} model);
	public ${entity.javaName} update${entity.javaName}(${entity.javaName} model);
	public ${entity.javaName} delete${entity.javaName}(${entity.javaName} model);	
	<#if entity.hasPrimaryKey >	
	public ${entity.javaName} find${entity.javaName}ByKey(<#list entity.primaryKeyColumns as attribute>${attribute.javaType} ${attribute.javaName} <#if attribute_has_next>, </#if></#list>);
	public ${entity.javaName} find${entity.javaName}ByKey(${entity.javaName} ${entity.normalizedJavaName});
	public ${entity.javaName} delete${entity.javaName}ByKey(<#list entity.primaryKeyColumns as attribute>${attribute.javaType} ${attribute.javaName} <#if attribute_has_next>, </#if></#list>);
	</#if>
	
	<#if entity.hasRelationships && !appConfig.webServiceApp>
    <#list entity.relationships as relationship>
    public <#if relationship.hasMultipleTarget >java.util.List<#else>${relationship.targetEntity.javaName}</#if>  find${relationship.targetEntity.javaName}By${entity.javaName}(${entity.javaName} ${entity.normalizedJavaName});
    </#list>
    </#if>	
	//=============================================================================
	//    end of definition of domain object of
	//    ${appConfig.outputPackageName}.model.${entity.javaName};
	//=============================================================================
		
	</#list>

}